namespace CSharpTestDemo._9._29质数和水仙花;

public class shuixianhua
{
    public static void FindNarcissisticNumbers()
    {
        for (int num = 100; num < 1000; num++)
        {
            int hundreds = num / 100;
            int tens = (num / 10) % 10;
            int units = num % 10;
            
            int sum = hundreds * hundreds * hundreds + 
                      tens * tens * tens + 
                      units * units * units;
            
            if (sum == num)
            {
                Console.WriteLine(num);
            }
        }
    }
}